package com.homedo.odin.solution.service;

import com.baomidou.mybatisplus.mapper.Condition;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.homedo.core.common.base.service.BaseService;
import com.homedo.odin.solution.dao.ColumnResourceMapper;
import com.homedo.odin.solution.model.entity.ColumnResource;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * <p> 栏目资源（视频等） 服务实现类 </p>
 *
 * @author HarveyDing
 * @since 2018-03-08
 */
@Service
public class ColumnResourceServiceImpl extends BaseService<ColumnResourceMapper, ColumnResource> {

    public List<ColumnResource> queryColumnResourceList(Long columnId) {
        EntityWrapper<ColumnResource> ew = new EntityWrapper<>();
        ew.setEntity(new ColumnResource());
        Wrapper<ColumnResource> wrapper = Condition.create().eq("column_id", columnId);
        List<ColumnResource> list = baseMapper.selectList(wrapper);
        return list;
    }
}
